#ifndef GETCONNECTCONFIG_H
#define GETCONNECTCONFIG_H

#include <QObject>
#include <QDir>
#include <QTime>
#include <QDebug>
#include <QString>
#include <QSettings>
#include <QFileInfo>
#include <QRandomGenerator>

//#define CONNECT_CONF_PATH "/etc/kylin-activation/activation_profile.ini"
#define PROFILE_CONF_PATH QDir::homePath()+"/.config/kylin-activation/activation_profile.ini"
#define DEFAULT_CONF_PATH "/usr/share/kylin-activation/activation_conf.ini"
#define DEFAULT_CONF_USER_PATH QDir::homePath()+"/.config/activation_conf.ini"

class getconnectconfig : public QObject
{
    Q_OBJECT
public:
    explicit getconnectconfig(QObject *parent = nullptr);

    void config_init();
    QString get_connectconf_value(QString, QString);
    void set_connectconf_value(QString, QString, QString);
    bool get_current_active_state();
    int generate_random_time(int, int);
    QString get_defaultconf_value(QString, QString);

private:
    QString activation_interval, retry_count, Initial_interval, offset_value;
signals:

};

#endif // GETCONNECTCONFIG_H
